<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Voyager Backend - User detail</title>
<script type="text/javascript" src="../lib/angular/angular.min.js"></script>
<script src="http://code.angularjs.org/1.2.1/angular-route.min.js"></script>
<link rel="stylesheet" type="text/css" href="../app/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css"
	href="../app/css/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="../app/css/main.css">
<link rel="stylesheet" type="text/css"
	href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
</head>
<body ng-app="myApp">


		<div class="container">
			<div class="main row">
				<div class="col-xs-3" ng-controller="homeCtrl">
					<ul class="list-group">
						<li class="list-group-item"><a href="#/home"> <span
								class="glyphicon glyphicon-home"></span></a></li>

						<li ng-repeat="item in menu" class="list-group-item"><a
							href="{{item.href}}"> {{item.link}}</a></li>
                        <li class="list-group-item"><a href="#" ng-click="logout()"> <span
								class="glyphicon glyphicon-log-out"></span></a></li>

					</ul>
				</div>
				<div class="col-xs-9 panel panel-default" ng-controller="user_detail_Ctrl"
					data-ng-init="init()">


					<div>
						<caption>
							<h1>User detail</h1>
						</caption>

                        <div class="form-group">
							<label class="col-sm-9 control-label"></label>
							<div class="col-sm-3">
								<p class="form-control-static">  <!--
									<a href="#/event" ng-click="return_to_event_detail(null,1)"> <span
										class="glyphicon glyphicon-arrow-left"></span></a>  -->
										
										<a href back-button ><span
										class="glyphicon glyphicon-arrow-left"></span></a>
								</p>
							</div>
						</div>
						
						
						<div class="form-group">
							<label class="col-sm-2 control-label"  id="label">Last Name</label>
							<div class="col-sm-10">
								<p class="form-control-static" style="padding-top: 0px;">{{owner.data.last_name}}</p>
							</div>
						</div>

						<div class="form-group">
							<label class="control-label col-sm-2"  id="label">First Name</label>
							<div class="col-sm-10">
								<p class="form-control-static" style="padding-top: 0px;">{{owner.data.first_name}}</p>
							</div>
						</div>


						

						<div class="form-group">
							<label class="col-sm-2 control-label"  id="label">Email</label>
							<div class="col-sm-10">
								<p class="form-control-static" style="padding-top: 0px;">{{owner.data.email}}</p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"  id="label">Login Type</label>
							<div class="col-sm-10">
								<p class="form-control-static" style="padding-top: 0px;">{{owner.data.login_type}}</p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"  id="label" style="padding-top: 5px;">Status</label>
							<div class="col-sm-10">

 									  <div ng-switch on="owner.data.blocked_flg" >
											<div ng-switch-when="1">Inactive 
											   <button type="button" class="btn btn-success" confirmed-click="lock(owner.data.id,1)" ng-confirm-click="Would you like to unlock this user?"> UnLock</button>
                                            </div>
											<div ng-switch-when="0">Active   
											   <button type="button" class="btn btn-danger" confirmed-click="lock(owner.data.id,0)" ng-confirm-click="Would you like to lock this user?">Lock</button>
											</div>
										</div>
 
                               		  <p class="" style="padding-top: 0px;" >
                                      </p>
                                      
							</div>

                          </div>

						<div class="form-group">
							<label class="col-sm-2 control-label"  id="label">Avatar</label>
							<div class="col-sm-10">
								<p class="form-control-static" style="padding-top: 0px;">
									<img src="{{owner.data.avatar_url}}" class="img-responsive"
										alt="{{owner.data.first_name}}">
								</p>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">Interests</label>
							<div class="col-sm-10">
								<p class="form-control-static" style="padding-top: 0px;">
									<!-- 
							  <ul class="class="list-group">
							  
							      <li ng-repeat="item in user.data.interests" class="list-group-item list-group-item-success"> {{item}}  </li>
							    
							  </ul>  -->


									<span data-ng-repeat="item in owner.data.interests">{{item}}<span
										ng-show="!$last">, </span></span>

								</p>
							</div>
						</div>
                      
                        <div class="form-group">
							<label class="col-sm-2 control-label"  id="label">Groups</label>
							<div class="col-sm-10"
								style="padding-left: 0px; padding-top: 0px;">

								<ul class="list-group" style="margin-left: 13px;"">
                                   <!-- 
									<li ng-repeat="item in groups.data.groups_list"
										class="list-group-item" style="width: 70%"><a href="#"
										ng-click="group_go(item.id,1)">{{item.name}} - {{item.id}}
									</a></li> -->
                                    
                                    <li ng-repeat="item in b"
										class="list-group-item" style="width: 70%">
									
        									<!--<a href="#/user" ng-click="group_go(item[1],1,user.data.id)">{{item[0]}} - {{item[1]}} </a>  -->
											
											<a href="#/group_detail/{{item[1]}}" >{{item[0]}} - {{item[1]}} </a> 
								            
									</li>
								</ul>

							</div>
							
							<div>

								 <nav>
									<ul class="pager">
										<li ng-hide="disablePrev_group" id="anchor"><a href="#/user_detail/{{owner.data.id}}"
											ng-click="previousPage_group()">Previous</a></li>
										<li ng-hide="disableNext_group" id="anchor"><a href="#/user_detail/{{owner.data.id}}"
											ng-click="nextPage_group()">Next</a></li>
									</ul>
								</nav>

						    </div>
						      
						</div>

                        


					</div>
				</div>




			</div>
		</div>

</body>
</html>